import { CommonObj } from './global';

export interface CourseInviteSearchParams {
  status?: number;
  phone?: string;
  name?: string;
  startDate?: string;
  endDate?: string;
  range?: string[];
}

export interface CourseSearchParams {
  name?: string;
  province?: string;
  city?: string;
  startDate?: string;
  endDate?: string;
  range?: string[];
}

export interface CourseTransport {
  name?: string;
  kilometers?: number;
}

export interface CourseFood {
  name?: string;
  pic?: string;
}

export interface CourseHotel {
  name?: string;
  pic?: string;
  address?: string;
  roomCount?: number;
  kilometers?: number;
}

export interface CourseTravel {
  name?: string;
  pic?: string;
  introduction?: string;
}

export interface CourseFairway {
  hole?: number;
  description?: string;
  pic?: string;
}

export interface CourseCup {
  id?: string;
  courseId?: string;
  officeId?: string;
  name?: string;
  holeCount?: number;
  parCount?: number;
  fieldLength?: number;
  fieldStyle?: string;
  fieldStyles?: string[];
  fieldDesigner?: string;
  fairway?: string;
  fairwayList?: CourseFairway[];
}

export interface CourseSeason {
  month?: number;
  type?: string;
}

export interface CourseItem extends CommonObj {
  officeId?: string;
  name: string;
  city: string;
  province: string;
  address: string;
  longitude: number;
  latitude: number;
  contactTel: string;
  contactEmail: string;
  contactName: string;
  logo: string;
  pics: string;
  picList: string[];
  bankName: string;
  bankAccount: string;
  bankNumber: string;
  license: string;
  introduction: string;
  status: number;

  courseCups: CourseCup[];

  station?: string;
  stationList?: CourseTransport[];
  airport?: string;
  airportList?: CourseTransport[];

  honor?: string;
  honorList?: string[];

  practiceCount?: number;
  grass?: number;
  green?: number;
  sand?: number;

  facility?: string;
  facilityList?: string[];

  food?: string;
  foodList?: CourseFood[];

  hotel?: string;
  hotelList?: CourseHotel[];

  recommendHotel?: string;
  recommendHotelList?: CourseHotel[];

  recommendScene?: string;
  recommendSceneList?: CourseTravel[];

  season?: string;
  seasonList?: CourseSeason[];

  onlyForData: number;
}

export interface CourseApproveItem extends CourseItem {
  id: number;
  courseId: string;
  refuseReason: string;
  phone: string;
}

export interface CourseCupTee extends CommonObj {
  teeName: string;
  teeColor: string;
  courseRating: string;
  slopeRating: string;
  teeLength: string;
}

export interface CourseHole extends CommonObj {
  courseId: string;
  cupId: string;
  officeId: string;
  holeType: number;
  holeIndex: number;
  holePriority: number;
  maleBlack: number;
  maleGold: number;
  maleBlue: number;
  maleWhite: number;
  maleRed: number;
  malePurple: number;
  femaleGold: number;
  femaleBlue: number;
  femaleWhite: number;
  femaleRed: number;
  femalePurple: number;
  par: number;
  versionNum: string;
  valid: number;
}

export interface HandicapCupTeeHole {
  par: number;
  diagram: string;
  tee_length: number;
  id: string;
  cup: number;
}

export interface HandicapCupTee {
  tee_name: string;
  teeName: string;
  tee_length_total: number;
  teeTotalLength: number;
  course_rating: string;
  courseRating: string;
  tee_color: string;
  teeColor: string;
  slope_rating: string;
  slopeRating: string;
  id: string;
  cups: HandicapCupTeeHole[];
}

export interface HandicapCup {
  id: string;
  name: string;
  assess_cup_tees: HandicapCupTee[];
  cupTees: HandicapCupTee[];
}

export interface HandicapCourse {
  name: string;
  id: string;
  logo_url: string;
  assess_cup_groups?: HandicapCup[];
}
